package repository

import (
	"context"
	"ruoyi-go-echo-ddd/internal/domain/model"
	"ruoyi-go-echo-ddd/internal/infrastructure/http/request"
)

// SysRoleRepository 系统角色Repository接口
type SysRoleRepository interface {
	Insert(ctx context.Context, sysRole *model.SysRole) (*model.SysRole, error)
	Update(ctx context.Context, sysRole *model.SysRole) (int64, error)
	UpdateWithOutMenuAndDataScope(ctx context.Context, sysRole *model.SysRole) (int64, error)
	BatchInsert(ctx context.Context, list []*model.SysRole) ([]int64, error)
	SelectById(ctx context.Context, id int64) (*model.SysRole, error)
	SelectPage(ctx context.Context, param *request.RolePageParam) ([]*model.SysRole, int64, int64, error)
	BatchDelete(ctx context.Context, ids []any) (int64, error)
	SelectList(ctx context.Context, ids []int64) ([]*model.SysRole, error)
	SelectIdsByUserId(ctx context.Context, userId any) ([]int64, error)
	SelectRoleKeyListByUserId(ctx context.Context, userId any) ([]string, error)
	SelectAll(ctx context.Context) ([]*model.SysRole, error)
	SelectAllFilterAdmin(list []*model.SysRole, isAdmin bool) ([]*model.SysRole, error)
	SelectRoleNameListByUserId(ctx context.Context, userId any) ([]string, error)
	SelectRoleByRoleName(ctx context.Context, sysRole *model.SysRole) (*model.SysRole, error)
	SelectCountByRoleKey(ctx context.Context, sysRole *model.SysRole) (*model.SysRole, error)
	// SelectRolePermsByUserId 根据ID查询用户角色切片
	SelectRolePermsByUserId(ctx context.Context, userId int64) ([]string, error)
	SelectAllForExcel(ctx context.Context) ([]*model.SysRole, error)
}